#include<iostream>
#include<vector>
using namespace std;
const int N = 1e5 + 10;
int cnt[10];
int n, m;
vector<int>ans;
int main()
{
	cin >> m;
	for (int i = 1; i <= 1e7 + 10; i++) {
		int t = i;
		while (t % 2 == 0)cnt[2]++, t /= 2;
		while (t % 5 == 0)cnt[5]++, t /= 5;
		if (min(cnt[2], cnt[5]) == m)ans.push_back(i);
	}
	cout << ans.size() << endl;
	for (int x : ans) {
		cout << x << " ";
	}
	return 0;
}